<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: async/single_thread_task_loop.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ddc98e6e1a9e0f6adcacab8ac7c1f855.html">async</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">single_thread_task_loop.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="single__thread__task__loop_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/* Flow</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright 2023 Akamai Technologies, Inc.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * Licensed under the Apache License, Version 2.0 (the</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> * &quot;License&quot;); you may not use this file except in</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> * compliance with the License.  You may obtain a copy</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> * of the License at</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> *</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> *   https://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment"> *</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment"> * Unless required by applicable law or agreed to in</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment"> * writing, software distributed under the License is</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment"> * distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment"> * CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment"> * See the License for the specific language governing</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"> * permissions and limitations under the License. */</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment"></span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">/// @file</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment"></span><span class="preprocessor">#include &quot;<a class="code" href="single__thread__task__loop_8hpp.html">flow/async/single_thread_task_loop.hpp</a>&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceflow_1_1async.html">flow::async</a></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span>{</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="comment">// Single_thread_task_loop implementations.</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#aea2bba204b5d18c3f87d05a4ca19a13f">   26</a></span><a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#aea2bba204b5d18c3f87d05a4ca19a13f">Single_thread_task_loop::Single_thread_task_loop</a>(<a class="code hl_class" href="classflow_1_1log_1_1Logger.html">log::Logger</a>* logger_ptr, <a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">util::String_view</a> nickname) :</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span>  log::Log_context(logger_ptr, <a class="code hl_enumeration" href="namespaceflow.html#a3938730ab4b89daf13d027a5f620e7ce">Flow_log_component</a>::<a class="code hl_enumvalue" href="namespaceflow_1_1async.html#a0a06794b16b72f2829ce3353557c8485a4d7a5700444c0570af37b1f9bcc6eb1f">S_ASYNC</a>),</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>  m_underlying_loop(get_logger(), nickname, 1) <span class="comment">// Attn: 1 thread.  Other (optional) args become irrelevant.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>{</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>  <a class="code hl_define" href="log_8hpp.html#a325fdd4b5cf0be49b37d3b7b7c29070d">FLOW_LOG_INFO</a>(<span class="stringliteral">&quot;Single_thread_task_loop [&quot;</span> &lt;&lt; <span class="keyword">static_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">void</span>*<span class="keyword">&gt;</span>(<span class="keyword">this</span>) &lt;&lt; <span class="stringliteral">&quot;] &quot;</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>                <span class="stringliteral">&quot;with nickname [&quot;</span> &lt;&lt; nickname &lt;&lt; <span class="stringliteral">&quot;], backed by a 1-thread Cross_thread_task_loop: &quot;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>                <span class="stringliteral">&quot;Started.  Above Cross_thread_task_loop messages, if any, contain details.&quot;</span>);</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>}</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#a74f7b9eabdfc366e0a6fa46abbcf5047">   35</a></span><a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#a74f7b9eabdfc366e0a6fa46abbcf5047">Single_thread_task_loop::~Single_thread_task_loop</a>() <span class="comment">// Virtual.</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>{</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>  <a class="code hl_define" href="log_8hpp.html#a325fdd4b5cf0be49b37d3b7b7c29070d">FLOW_LOG_INFO</a>(<span class="stringliteral">&quot;Single_thread_task_loop [&quot;</span> &lt;&lt; <span class="keyword">this</span> &lt;&lt; <span class="stringliteral">&quot;]: Destroying object: see subsequent Cross_thread_task_loop &quot;</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>                <span class="stringliteral">&quot;messages if any.&quot;</span>);</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>}</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#a0886e7f19d0c8b19f74851578802a5e5">   41</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#a0886e7f19d0c8b19f74851578802a5e5">Single_thread_task_loop::start</a>(<a class="code hl_class" href="classflow_1_1Function.html">Task</a>&amp;&amp; init_task_or_empty)</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>{</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>  <span class="comment">// There&#39;s an optional 2nd arg we omit.</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>  <a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4">m_underlying_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Cross__thread__task__loop.html#a5705e34163dec8463a30361bdb2fa83f">start</a>(std::move(init_task_or_empty), [<span class="keyword">this</span>](<span class="keywordtype">size_t</span>)</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>  {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>    <span class="comment">// This occurs ~first thing in the thread (before init_task_or_empty() if any).</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span>    <a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a5041ca2eba3b58b03ba09a48c938be05">m_started_thread_id_or_none</a> = util::this_thread::get_id();</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>  });</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>}</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#ac282eacf6615eca207ce3cc74f419933">   51</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#ac282eacf6615eca207ce3cc74f419933">Single_thread_task_loop::in_thread</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>  <span class="keywordflow">return</span> util::this_thread::get_id() == <a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a5041ca2eba3b58b03ba09a48c938be05">m_started_thread_id_or_none</a>; <span class="comment">// Corner case: false before start().</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>}</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#aad1053b2d86401d34fd3658630064135">   56</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#aad1053b2d86401d34fd3658630064135">Single_thread_task_loop::stop</a>()</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>{</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>  <a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4">m_underlying_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Cross__thread__task__loop.html#aa0f53f269524b701b23237766f79df2d">stop</a>();</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>}</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#adaf7dbd5fbd6ee7c886daabc7a6ad0ae">   61</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#adaf7dbd5fbd6ee7c886daabc7a6ad0ae">Single_thread_task_loop::post</a>(<a class="code hl_class" href="classflow_1_1Function.html">Task</a>&amp;&amp; task, <a class="code hl_enumeration" href="namespaceflow_1_1async.html#a0a06794b16b72f2829ce3353557c8485">Synchronicity</a> synchronicity)</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>{</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>  <a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4">m_underlying_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Cross__thread__task__loop.html#ab785edcaa745fb859aaef4743478ea07">post</a>(std::move(task), synchronicity);</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>}</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span> </div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#a2669021fe545a05ced370f09ce794f52">   66</a></span><a class="code hl_typedef" href="namespaceflow_1_1util.html#aa0d10f5a906b3229f48979aa43e9ff7e">util::Scheduled_task_handle</a> <a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#a2669021fe545a05ced370f09ce794f52">Single_thread_task_loop::schedule_from_now</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a>&amp; from_now,</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>                                                                       <a class="code hl_class" href="classflow_1_1Function.html">Scheduled_task</a>&amp;&amp; task)</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>{</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4">m_underlying_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Cross__thread__task__loop.html#a1008ae4c48d32ebf835d7a7ba203e5a9">schedule_from_now</a>(from_now, std::move(task));</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>}</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#a0fff7cd79132c92a03e46be93f7f53b8">   72</a></span><a class="code hl_typedef" href="namespaceflow_1_1util.html#aa0d10f5a906b3229f48979aa43e9ff7e">util::Scheduled_task_handle</a> <a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#a0fff7cd79132c92a03e46be93f7f53b8">Single_thread_task_loop::schedule_at</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="namespaceflow.html#a9d9cc2eeb10d398cff5591d446b763b8">Fine_time_pt</a>&amp; at,</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>                                                                 <a class="code hl_class" href="classflow_1_1Function.html">Scheduled_task</a>&amp;&amp; task)</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>{</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4">m_underlying_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Cross__thread__task__loop.html#aa8fb0ac1ac3dc4fb86b0a7dbec0a8686">schedule_at</a>(at, std::move(task));</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>}</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#a324d656809aede5492a4767a4ee8cdf6">   78</a></span><a class="code hl_typedef" href="namespaceflow_1_1async.html#a968806f54b14c697fd76b3339a2bdbbf">Task_engine_ptr</a> <a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#a324d656809aede5492a4767a4ee8cdf6">Single_thread_task_loop::task_engine</a>()</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>{</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4">m_underlying_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Cross__thread__task__loop.html#ac46c461e0e5f4cf22305eb640ac2bbb0">task_engine</a>();</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>}</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Single__thread__task__loop.html#a73d3462ff7f1759382d33476b7257f16">   83</a></span><a class="code hl_class" href="classflow_1_1async_1_1Concurrent__task__loop.html">Concurrent_task_loop</a>* <a class="code hl_function" href="classflow_1_1async_1_1Single__thread__task__loop.html#a73d3462ff7f1759382d33476b7257f16">Single_thread_task_loop::underlying_loop</a>()</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>{</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><a class="code hl_class" href="classflow_1_1async_1_1Concurrent__task__loop.html">Concurrent_task_loop</a>*<span class="keyword">&gt;</span>(&amp;<a class="code hl_variable" href="classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4">m_underlying_loop</a>);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>}</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span><span class="comment">// Timed_single_thread_task_loop implementations.</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a0318c7769d31232ec7b0c0ad0d8ad88f">   90</a></span><a class="code hl_function" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a0318c7769d31232ec7b0c0ad0d8ad88f">Timed_single_thread_task_loop::Timed_single_thread_task_loop</a>(<a class="code hl_class" href="classflow_1_1log_1_1Logger.html">log::Logger</a>* logger_ptr, <a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">util::String_view</a> nickname,</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>                                                             <a class="code hl_enumeration" href="namespaceflow_1_1perf.html#ad61fb186191e4bb824d14601d11a2eb0">perf::Clock_type</a> clock_type) :</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>  <a class="code hl_class" href="classflow_1_1async_1_1Single__thread__task__loop.html">Single_thread_task_loop</a>(logger_ptr, nickname),</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>  m_timed_loop(underlying_loop(), clock_type,</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>               <span class="comment">// Not thread-safe: but we have only one thread.</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>               [](perf::<a class="code hl_typedef" href="namespaceflow_1_1perf.html#a75b06c669e720c60621f3c68c3d34408">duration_rep_t</a>* time_acc) -&gt; perf::<a class="code hl_typedef" href="namespaceflow_1_1perf.html#a75b06c669e720c60621f3c68c3d34408">duration_rep_t</a></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>                 { <span class="keyword">const</span> <span class="keyword">auto</span> ret = *time_acc; *time_acc = 0; <span class="keywordflow">return</span> ret; })</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>{</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>  <span class="comment">// That&#39;s it.</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>}</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#aafc6c8e2d94c5387bfd4e49795244feb">  101</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#aafc6c8e2d94c5387bfd4e49795244feb">Timed_single_thread_task_loop::post</a>(<a class="code hl_class" href="classflow_1_1Function.html">Task</a>&amp;&amp; task, <a class="code hl_enumeration" href="namespaceflow_1_1async.html#a0a06794b16b72f2829ce3353557c8485">Synchronicity</a> synchronicity)</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span>{</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>  <a class="code hl_variable" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9">m_timed_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#adb9a4a09e821aad135cfa1f493624630">post</a>(std::move(task), synchronicity);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>}</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#afed368e611529a648a7dd2999a89ab0d">  106</a></span><a class="code hl_typedef" href="namespaceflow_1_1util.html#aa0d10f5a906b3229f48979aa43e9ff7e">util::Scheduled_task_handle</a> <a class="code hl_function" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#afed368e611529a648a7dd2999a89ab0d">Timed_single_thread_task_loop::schedule_from_now</a></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span>                              (<span class="keyword">const</span> <a class="code hl_typedef" href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">Fine_duration</a>&amp; from_now, <a class="code hl_class" href="classflow_1_1Function.html">Scheduled_task</a>&amp;&amp; task)</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>{</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9">m_timed_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a79b1d2f2b5bf4fdf16e7701fe3bb44d1">schedule_from_now</a>(from_now, std::move(task));</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>}</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a939142533e48fc54040825aad2010121">  112</a></span><a class="code hl_typedef" href="namespaceflow_1_1util.html#aa0d10f5a906b3229f48979aa43e9ff7e">util::Scheduled_task_handle</a> <a class="code hl_function" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a939142533e48fc54040825aad2010121">Timed_single_thread_task_loop::schedule_at</a>(<span class="keyword">const</span> <a class="code hl_typedef" href="namespaceflow.html#a9d9cc2eeb10d398cff5591d446b763b8">Fine_time_pt</a>&amp; at, <a class="code hl_class" href="classflow_1_1Function.html">Scheduled_task</a>&amp;&amp; task)</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>{</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9">m_timed_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a2c3566acb42c14ce7fe31026a711a30b">schedule_at</a>(at, std::move(task));</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>}</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#ae429fb31d17d422306cd9da398e53e5c">  117</a></span><a class="code hl_typedef" href="namespaceflow_1_1perf.html#a38e42ae0923eb23052e3a8a1e7956456">perf::Duration</a> <a class="code hl_function" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#ae429fb31d17d422306cd9da398e53e5c">Timed_single_thread_task_loop::accumulated_time</a>()</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>{</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9">m_timed_loop</a>.<a class="code hl_function" href="classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a45c91b87a9906781479e2387f2f93573">accumulated_time</a>();</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>}</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>} <span class="comment">// namespace flow::async</span></div>
<div class="ttc" id="aclassflow_1_1Function_html"><div class="ttname"><a href="classflow_1_1Function.html">flow::Function</a></div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00512">common.hpp:512</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Concurrent__task__loop_html"><div class="ttname"><a href="classflow_1_1async_1_1Concurrent__task__loop.html">flow::async::Concurrent_task_loop</a></div><div class="ttdoc">The core flow::async interface, providing an optionally multi-threaded thread pool onto which runnabl...</div><div class="ttdef"><b>Definition:</b> <a href="concurrent__task__loop_8hpp_source.html#l00322">concurrent_task_loop.hpp:324</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Cross__thread__task__loop_html_a1008ae4c48d32ebf835d7a7ba203e5a9"><div class="ttname"><a href="classflow_1_1async_1_1Cross__thread__task__loop.html#a1008ae4c48d32ebf835d7a7ba203e5a9">flow::async::Cross_thread_task_loop::schedule_from_now</a></div><div class="ttdeci">util::Scheduled_task_handle schedule_from_now(const Fine_duration &amp;from_now, Scheduled_task &amp;&amp;task) override</div><div class="ttdoc">Implements superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="x__thread__task__loop_8cpp_source.html#l00319">x_thread_task_loop.cpp:319</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Cross__thread__task__loop_html_a5705e34163dec8463a30361bdb2fa83f"><div class="ttname"><a href="classflow_1_1async_1_1Cross__thread__task__loop.html#a5705e34163dec8463a30361bdb2fa83f">flow::async::Cross_thread_task_loop::start</a></div><div class="ttdeci">void start(Task &amp;&amp;init_task_or_empty=Task(), const Thread_init_func &amp;thread_init_func_or_empty=Thread_init_func()) override</div><div class="ttdoc">Implements superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="x__thread__task__loop_8cpp_source.html#l00081">x_thread_task_loop.cpp:81</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Cross__thread__task__loop_html_aa0f53f269524b701b23237766f79df2d"><div class="ttname"><a href="classflow_1_1async_1_1Cross__thread__task__loop.html#aa0f53f269524b701b23237766f79df2d">flow::async::Cross_thread_task_loop::stop</a></div><div class="ttdeci">void stop() override</div><div class="ttdoc">Implements superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="x__thread__task__loop_8cpp_source.html#l00192">x_thread_task_loop.cpp:192</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Cross__thread__task__loop_html_aa8fb0ac1ac3dc4fb86b0a7dbec0a8686"><div class="ttname"><a href="classflow_1_1async_1_1Cross__thread__task__loop.html#aa8fb0ac1ac3dc4fb86b0a7dbec0a8686">flow::async::Cross_thread_task_loop::schedule_at</a></div><div class="ttdeci">util::Scheduled_task_handle schedule_at(const Fine_time_pt &amp;at, Scheduled_task &amp;&amp;task) override</div><div class="ttdoc">Implements superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="x__thread__task__loop_8cpp_source.html#l00396">x_thread_task_loop.cpp:396</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Cross__thread__task__loop_html_ab785edcaa745fb859aaef4743478ea07"><div class="ttname"><a href="classflow_1_1async_1_1Cross__thread__task__loop.html#ab785edcaa745fb859aaef4743478ea07">flow::async::Cross_thread_task_loop::post</a></div><div class="ttdeci">void post(Task &amp;&amp;task, Synchronicity synchronicity=Synchronicity::S_ASYNC) override</div><div class="ttdoc">Implements superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="x__thread__task__loop_8cpp_source.html#l00277">x_thread_task_loop.cpp:277</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Cross__thread__task__loop_html_ac46c461e0e5f4cf22305eb640ac2bbb0"><div class="ttname"><a href="classflow_1_1async_1_1Cross__thread__task__loop.html#ac46c461e0e5f4cf22305eb640ac2bbb0">flow::async::Cross_thread_task_loop::task_engine</a></div><div class="ttdeci">Task_engine_ptr task_engine() override</div><div class="ttdoc">See superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="x__thread__task__loop_8cpp_source.html#l00414">x_thread_task_loop.cpp:414</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html">flow::async::Single_thread_task_loop</a></div><div class="ttdoc">A Concurrent_task_loop-related adapter-style class that represents a single-thread task loop; essenti...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8hpp_source.html#l00075">single_thread_task_loop.hpp:78</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_a0886e7f19d0c8b19f74851578802a5e5"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#a0886e7f19d0c8b19f74851578802a5e5">flow::async::Single_thread_task_loop::start</a></div><div class="ttdeci">void start(Task &amp;&amp;init_task_or_empty=Task())</div><div class="ttdoc">Starts the 1 thread in the thread pool; any queued post()ed (and similar) tasks may begin executing i...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00041">single_thread_task_loop.cpp:41</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_a0fff7cd79132c92a03e46be93f7f53b8"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#a0fff7cd79132c92a03e46be93f7f53b8">flow::async::Single_thread_task_loop::schedule_at</a></div><div class="ttdeci">virtual util::Scheduled_task_handle schedule_at(const Fine_time_pt &amp;at, Scheduled_task &amp;&amp;task)</div><div class="ttdoc">Equivalent to schedule_from_now() except one specifies an absolute time point instead of wait duratio...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00072">single_thread_task_loop.cpp:72</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_a1d33d207f5e0e7479a00046ace7e54a4"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#a1d33d207f5e0e7479a00046ace7e54a4">flow::async::Single_thread_task_loop::m_underlying_loop</a></div><div class="ttdeci">Task_loop_impl m_underlying_loop</div><div class="ttdoc">See underlying_loop().</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8hpp_source.html#l00290">single_thread_task_loop.hpp:290</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_a2669021fe545a05ced370f09ce794f52"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#a2669021fe545a05ced370f09ce794f52">flow::async::Single_thread_task_loop::schedule_from_now</a></div><div class="ttdeci">virtual util::Scheduled_task_handle schedule_from_now(const Fine_duration &amp;from_now, Scheduled_task &amp;&amp;task)</div><div class="ttdoc">Equivalent to post() but execution is scheduled for later, after the given time period passes.</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00066">single_thread_task_loop.cpp:66</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_a324d656809aede5492a4767a4ee8cdf6"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#a324d656809aede5492a4767a4ee8cdf6">flow::async::Single_thread_task_loop::task_engine</a></div><div class="ttdeci">Task_engine_ptr task_engine()</div><div class="ttdoc">Returns a pointer to the internal util::Task_engine (a/k/a boost.asio io_context) for the purpose of ...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00078">single_thread_task_loop.cpp:78</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_a5041ca2eba3b58b03ba09a48c938be05"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#a5041ca2eba3b58b03ba09a48c938be05">flow::async::Single_thread_task_loop::m_started_thread_id_or_none</a></div><div class="ttdeci">util::Thread_id m_started_thread_id_or_none</div><div class="ttdoc">Before start() it is default-cted (not-a-thread); from start() on it's the started thread's ID.</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8hpp_source.html#l00293">single_thread_task_loop.hpp:293</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_a73d3462ff7f1759382d33476b7257f16"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#a73d3462ff7f1759382d33476b7257f16">flow::async::Single_thread_task_loop::underlying_loop</a></div><div class="ttdeci">Concurrent_task_loop * underlying_loop()</div><div class="ttdoc">Returns the underlying work-horse Concurrent_task_loop.</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00083">single_thread_task_loop.cpp:83</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_a74f7b9eabdfc366e0a6fa46abbcf5047"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#a74f7b9eabdfc366e0a6fa46abbcf5047">flow::async::Single_thread_task_loop::~Single_thread_task_loop</a></div><div class="ttdeci">~Single_thread_task_loop() override</div><div class="ttdoc">Executes stop() – see its doc header please – and then cleans up any resources.</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00035">single_thread_task_loop.cpp:35</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_aad1053b2d86401d34fd3658630064135"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#aad1053b2d86401d34fd3658630064135">flow::async::Single_thread_task_loop::stop</a></div><div class="ttdeci">void stop()</div><div class="ttdoc">Waits for the ongoing task/completion handler – if one is running – to return; then prevents any furt...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00056">single_thread_task_loop.cpp:56</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_ac282eacf6615eca207ce3cc74f419933"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#ac282eacf6615eca207ce3cc74f419933">flow::async::Single_thread_task_loop::in_thread</a></div><div class="ttdeci">bool in_thread() const</div><div class="ttdoc">Returns true if and only if the thread executing this call is the thread started by start().</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00051">single_thread_task_loop.cpp:51</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_adaf7dbd5fbd6ee7c886daabc7a6ad0ae"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#adaf7dbd5fbd6ee7c886daabc7a6ad0ae">flow::async::Single_thread_task_loop::post</a></div><div class="ttdeci">virtual void post(Task &amp;&amp;task, Synchronicity synchronicity=Synchronicity::S_ASYNC)</div><div class="ttdoc">Cause the given Task (function) to execute within the worker thread as soon as the thread is free of ...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00061">single_thread_task_loop.cpp:61</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Single__thread__task__loop_html_aea2bba204b5d18c3f87d05a4ca19a13f"><div class="ttname"><a href="classflow_1_1async_1_1Single__thread__task__loop.html#aea2bba204b5d18c3f87d05a4ca19a13f">flow::async::Single_thread_task_loop::Single_thread_task_loop</a></div><div class="ttdeci">Single_thread_task_loop(log::Logger *logger_ptr, util::String_view nickname)</div><div class="ttdoc">Constructs object, making it available for post() and similar work, but without starting any thread a...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00026">single_thread_task_loop.cpp:26</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__concurrent__task__loop__impl_html_a2c3566acb42c14ce7fe31026a711a30b"><div class="ttname"><a href="classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a2c3566acb42c14ce7fe31026a711a30b">flow::async::Timed_concurrent_task_loop_impl::schedule_at</a></div><div class="ttdeci">util::Scheduled_task_handle schedule_at(const Fine_time_pt &amp;at, Scheduled_task &amp;&amp;task) override</div><div class="ttdoc">Implements superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="timed__concurrent__task__loop_8hpp_source.html#l00355">timed_concurrent_task_loop.hpp:356</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__concurrent__task__loop__impl_html_a45c91b87a9906781479e2387f2f93573"><div class="ttname"><a href="classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a45c91b87a9906781479e2387f2f93573">flow::async::Timed_concurrent_task_loop_impl::accumulated_time</a></div><div class="ttdeci">perf::Duration accumulated_time()</div><div class="ttdoc">Returns the accumulated time spent on tasks this thread pool handles since its last invocation; and r...</div><div class="ttdef"><b>Definition:</b> <a href="timed__concurrent__task__loop_8hpp_source.html#l00385">timed_concurrent_task_loop.hpp:385</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__concurrent__task__loop__impl_html_a79b1d2f2b5bf4fdf16e7701fe3bb44d1"><div class="ttname"><a href="classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#a79b1d2f2b5bf4fdf16e7701fe3bb44d1">flow::async::Timed_concurrent_task_loop_impl::schedule_from_now</a></div><div class="ttdeci">util::Scheduled_task_handle schedule_from_now(const Fine_duration &amp;from_now, Scheduled_task &amp;&amp;task) override</div><div class="ttdoc">Implements superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="timed__concurrent__task__loop_8hpp_source.html#l00347">timed_concurrent_task_loop.hpp:348</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__concurrent__task__loop__impl_html_adb9a4a09e821aad135cfa1f493624630"><div class="ttname"><a href="classflow_1_1async_1_1Timed__concurrent__task__loop__impl.html#adb9a4a09e821aad135cfa1f493624630">flow::async::Timed_concurrent_task_loop_impl::post</a></div><div class="ttdeci">void post(Task &amp;&amp;task, Synchronicity synchronicity=Synchronicity::S_ASYNC) override</div><div class="ttdoc">Implements superclass API.</div><div class="ttdef"><b>Definition:</b> <a href="timed__concurrent__task__loop_8hpp_source.html#l00332">timed_concurrent_task_loop.hpp:332</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__single__thread__task__loop_html_a0318c7769d31232ec7b0c0ad0d8ad88f"><div class="ttname"><a href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a0318c7769d31232ec7b0c0ad0d8ad88f">flow::async::Timed_single_thread_task_loop::Timed_single_thread_task_loop</a></div><div class="ttdeci">Timed_single_thread_task_loop(log::Logger *logger_ptr, util::String_view nickname, perf::Clock_type clock_type=perf::Clock_type::S_CPU_THREAD_TOTAL_HI_RES)</div><div class="ttdoc">Constructs object, similarly to Single_thread_task_loop ctor; but with timing capabilities a-la Timed...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00090">single_thread_task_loop.cpp:90</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__single__thread__task__loop_html_a3042959ca9c8f3d1bcd78ff71e3ecdd9"><div class="ttname"><a href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a3042959ca9c8f3d1bcd78ff71e3ecdd9">flow::async::Timed_single_thread_task_loop::m_timed_loop</a></div><div class="ttdeci">Timed_concurrent_task_loop_impl&lt; perf::duration_rep_t &gt; m_timed_loop</div><div class="ttdoc">The task-timing decorator of our superclass Single_thread_task_loop's protected superclass.</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8hpp_source.html#l00394">single_thread_task_loop.hpp:394</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__single__thread__task__loop_html_a939142533e48fc54040825aad2010121"><div class="ttname"><a href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#a939142533e48fc54040825aad2010121">flow::async::Timed_single_thread_task_loop::schedule_at</a></div><div class="ttdeci">util::Scheduled_task_handle schedule_at(const Fine_time_pt &amp;at, Scheduled_task &amp;&amp;task) override</div><div class="ttdoc">Implements superclass method but with the addition of timing of task, accessible through accumulated_...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00112">single_thread_task_loop.cpp:112</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__single__thread__task__loop_html_aafc6c8e2d94c5387bfd4e49795244feb"><div class="ttname"><a href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#aafc6c8e2d94c5387bfd4e49795244feb">flow::async::Timed_single_thread_task_loop::post</a></div><div class="ttdeci">void post(Task &amp;&amp;task, Synchronicity synchronicity=Synchronicity::S_ASYNC) override</div><div class="ttdoc">Implements superclass method but with the addition of timing of task, accessible through accumulated_...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00101">single_thread_task_loop.cpp:101</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__single__thread__task__loop_html_ae429fb31d17d422306cd9da398e53e5c"><div class="ttname"><a href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#ae429fb31d17d422306cd9da398e53e5c">flow::async::Timed_single_thread_task_loop::accumulated_time</a></div><div class="ttdeci">perf::Duration accumulated_time()</div><div class="ttdoc">See Timed_concurrent_task_loop_impl::accumulated_time().</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00117">single_thread_task_loop.cpp:117</a></div></div>
<div class="ttc" id="aclassflow_1_1async_1_1Timed__single__thread__task__loop_html_afed368e611529a648a7dd2999a89ab0d"><div class="ttname"><a href="classflow_1_1async_1_1Timed__single__thread__task__loop.html#afed368e611529a648a7dd2999a89ab0d">flow::async::Timed_single_thread_task_loop::schedule_from_now</a></div><div class="ttdeci">util::Scheduled_task_handle schedule_from_now(const Fine_duration &amp;from_now, Scheduled_task &amp;&amp;task) override</div><div class="ttdoc">Implements superclass method but with the addition of timing of task, accessible through accumulated_...</div><div class="ttdef"><b>Definition:</b> <a href="single__thread__task__loop_8cpp_source.html#l00106">single_thread_task_loop.cpp:107</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Logger_html"><div class="ttname"><a href="classflow_1_1log_1_1Logger.html">flow::log::Logger</a></div><div class="ttdoc">Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01280">log.hpp:1284</a></div></div>
<div class="ttc" id="alog_8hpp_html_a325fdd4b5cf0be49b37d3b7b7c29070d"><div class="ttname"><a href="log_8hpp.html#a325fdd4b5cf0be49b37d3b7b7c29070d">FLOW_LOG_INFO</a></div><div class="ttdeci">#define FLOW_LOG_INFO(ARG_stream_fragment)</div><div class="ttdoc">Logs an INFO message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l00197">log.hpp:197</a></div></div>
<div class="ttc" id="anamespaceflow_1_1async_html"><div class="ttname"><a href="namespaceflow_1_1async.html">flow::async</a></div><div class="ttdoc">Flow module containing tools enabling multi-threaded event loops operating under the asynchronous-tas...</div><div class="ttdef"><b>Definition:</b> <a href="async__fwd_8hpp_source.html#l00074">async_fwd.hpp:75</a></div></div>
<div class="ttc" id="anamespaceflow_1_1async_html_a0a06794b16b72f2829ce3353557c8485"><div class="ttname"><a href="namespaceflow_1_1async.html#a0a06794b16b72f2829ce3353557c8485">flow::async::Synchronicity</a></div><div class="ttdeci">Synchronicity</div><div class="ttdoc">Enumeration indicating the manner in which asio_exec_ctx_post(), and various boost....</div><div class="ttdef"><b>Definition:</b> <a href="async__fwd_8hpp_source.html#l00222">async_fwd.hpp:223</a></div></div>
<div class="ttc" id="anamespaceflow_1_1async_html_a0a06794b16b72f2829ce3353557c8485a4d7a5700444c0570af37b1f9bcc6eb1f"><div class="ttname"><a href="namespaceflow_1_1async.html#a0a06794b16b72f2829ce3353557c8485a4d7a5700444c0570af37b1f9bcc6eb1f">flow::async::Synchronicity::S_ASYNC</a></div><div class="ttdeci">@ S_ASYNC</div><div class="ttdoc">Simply post the given task to execute asynchronously in some execution context – as soon as the conte...</div></div>
<div class="ttc" id="anamespaceflow_1_1async_html_a968806f54b14c697fd76b3339a2bdbbf"><div class="ttname"><a href="namespaceflow_1_1async.html#a968806f54b14c697fd76b3339a2bdbbf">flow::async::Task_engine_ptr</a></div><div class="ttdeci">boost::shared_ptr&lt; util::Task_engine &gt; Task_engine_ptr</div><div class="ttdoc">Short-hand for reference-counting pointer to a mutable util::Task_engine (a/k/a boost::asio::io_conte...</div><div class="ttdef"><b>Definition:</b> <a href="async__fwd_8hpp_source.html#l00198">async_fwd.hpp:198</a></div></div>
<div class="ttc" id="anamespaceflow_1_1perf_html_a38e42ae0923eb23052e3a8a1e7956456"><div class="ttname"><a href="namespaceflow_1_1perf.html#a38e42ae0923eb23052e3a8a1e7956456">flow::perf::Duration</a></div><div class="ttdeci">Fine_duration Duration</div><div class="ttdoc">Short-hand for a high-precision boost.chrono duration, formally equivalent to flow::Fine_duration.</div><div class="ttdef"><b>Definition:</b> <a href="clock__type__fwd_8hpp_source.html#l00039">clock_type_fwd.hpp:39</a></div></div>
<div class="ttc" id="anamespaceflow_1_1perf_html_a75b06c669e720c60621f3c68c3d34408"><div class="ttname"><a href="namespaceflow_1_1perf.html#a75b06c669e720c60621f3c68c3d34408">flow::perf::duration_rep_t</a></div><div class="ttdeci">Duration::rep duration_rep_t</div><div class="ttdoc">The raw type used in Duration to store its clock ticks.</div><div class="ttdef"><b>Definition:</b> <a href="clock__type__fwd_8hpp_source.html#l00050">clock_type_fwd.hpp:50</a></div></div>
<div class="ttc" id="anamespaceflow_1_1perf_html_ad61fb186191e4bb824d14601d11a2eb0"><div class="ttname"><a href="namespaceflow_1_1perf.html#ad61fb186191e4bb824d14601d11a2eb0">flow::perf::Clock_type</a></div><div class="ttdeci">Clock_type</div><div class="ttdoc">Clock types supported by flow::perf module facilities, perf::Checkpointing_timer in particular.</div><div class="ttdef"><b>Definition:</b> <a href="clock__type__fwd_8hpp_source.html#l00066">clock_type_fwd.hpp:67</a></div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_aa0d10f5a906b3229f48979aa43e9ff7e"><div class="ttname"><a href="namespaceflow_1_1util.html#aa0d10f5a906b3229f48979aa43e9ff7e">flow::util::Scheduled_task_handle</a></div><div class="ttdeci">boost::shared_ptr&lt; Scheduled_task_handle_state &gt; Scheduled_task_handle</div><div class="ttdoc">Black-box type that represents a handle to a scheduled task as scheduled by schedule_task_at() or sch...</div><div class="ttdef"><b>Definition:</b> <a href="sched__task__fwd_8hpp_source.html#l00045">sched_task_fwd.hpp:45</a></div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_ae4dc52186797094b3040379ff19124c9"><div class="ttname"><a href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">flow::util::String_view</a></div><div class="ttdeci">Basic_string_view&lt; char &gt; String_view</div><div class="ttdoc">Commonly used char-based Basic_string_view. See its doc header.</div><div class="ttdef"><b>Definition:</b> <a href="string__view_8hpp_source.html#l00191">string_view.hpp:191</a></div></div>
<div class="ttc" id="anamespaceflow_html_a3938730ab4b89daf13d027a5f620e7ce"><div class="ttname"><a href="namespaceflow.html#a3938730ab4b89daf13d027a5f620e7ce">flow::Flow_log_component</a></div><div class="ttdeci">Flow_log_component</div><div class="ttdoc">The flow::log::Component payload enumeration comprising various log components used by Flow's own int...</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00637">common.hpp:638</a></div></div>
<div class="ttc" id="anamespaceflow_html_a48799f1263cdeedec125be51a3db2b79"><div class="ttname"><a href="namespaceflow.html#a48799f1263cdeedec125be51a3db2b79">flow::Fine_duration</a></div><div class="ttdeci">Fine_clock::duration Fine_duration</div><div class="ttdoc">A high-res time duration as computed from two Fine_time_pts.</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00416">common.hpp:416</a></div></div>
<div class="ttc" id="anamespaceflow_html_a9d9cc2eeb10d398cff5591d446b763b8"><div class="ttname"><a href="namespaceflow.html#a9d9cc2eeb10d398cff5591d446b763b8">flow::Fine_time_pt</a></div><div class="ttdeci">Fine_clock::time_point Fine_time_pt</div><div class="ttdoc">A high-res time point as returned by Fine_clock::now() and suitable for precise time math in general.</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00413">common.hpp:413</a></div></div>
<div class="ttc" id="asingle__thread__task__loop_8hpp_html"><div class="ttname"><a href="single__thread__task__loop_8hpp.html">single_thread_task_loop.hpp</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
